package com.house.system.controller;

import com.house.common.utils.R;
import com.house.system.entity.TbArea;
import com.house.system.service.CityService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/city")
@CrossOrigin
public class CityController {
    @Autowired
    private CityService cityService;
    @RequestMapping("/findlist/{cid}")
    public R findlist(@PathVariable("cid") Integer cid){
        List<TbArea> tbAreaList = cityService.findlist(cid);
        return  R.ok().put("tbarea",tbAreaList);
    }

}
